package com.ybkj.o2o.zhuanche.entity;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author bo.
 */
public class ChartYear extends Base {

  private static final long serialVersionUID = -1768698884416041970L;

  private Integer year;

  private Long companyId; // 关联子公司ID

  private String companyName; // 关联子公司名称

  private long totalSuccessNum;// 总成交单量

  private long totalCancelNum;// 总销单单量

  private BigDecimal totalPrice;// 总价
  private String appKey;

  public String getAppKey() {
    return appKey;
  }

  public void setAppKey(String appKey) {
    this.appKey = appKey;
  }

  private List<ChartMonth> months;

  public Integer getYear() {
    return year;
  }

  public void setYear(Integer year) {
    this.year = year;
  }

  public Long getCompanyId() {
    return companyId;
  }

  public void setCompanyId(Long companyId) {
    this.companyId = companyId;
  }

  public String getCompanyName() {
    return companyName;
  }

  public void setCompanyName(String companyName) {
    this.companyName = companyName;
  }

  public long getTotalSuccessNum() {
    return totalSuccessNum;
  }

  public void setTotalSuccessNum(long totalSuccessNum) {
    this.totalSuccessNum = totalSuccessNum;
  }

  public long getTotalCancelNum() {
    return totalCancelNum;
  }

  public void setTotalCancelNum(long totalCancelNum) {
    this.totalCancelNum = totalCancelNum;
  }
  /**
   * 如果为空则返回0.
   */

  public BigDecimal getTotalPrice() {
    if (null == totalPrice) {
      return new BigDecimal(0);
    }
    return totalPrice;
  }

  public void setTotalPrice(BigDecimal totalPrice) {
    this.totalPrice = totalPrice;
  }

  public List<ChartMonth> getMonths() {
    return months;
  }

  public void setMonths(List<ChartMonth> months) {
    this.months = months;
  }

}
